using XnaInput = Microsoft.Xna.Framework.Input;

using Storyteller.Framework.Math;

namespace Storyteller.Framework.Input
{
	public class Mouse
	{
		public enum Button
		{
			Left = 0,
			Right,
			Middle,
			Button4,
			Button5,
			Button6
		}

		public static Point GetPosition()
		{
			return new Point(Game.Instance.MouseState.X, Game.Instance.MouseState.Y);
		}

		public static bool IsButtonDown(Button button)
		{
			switch (button)
			{
				case Button.Left:
					return Game.Instance.MouseState.LeftButton == XnaInput.ButtonState.Pressed;
				case Button.Right:
					return Game.Instance.MouseState.RightButton == XnaInput.ButtonState.Pressed;
				case Button.Middle:
					return Game.Instance.MouseState.MiddleButton == XnaInput.ButtonState.Pressed;
				case Button.Button4:
					return Game.Instance.MouseState.XButton1 == XnaInput.ButtonState.Pressed;
				case Button.Button5:
					return Game.Instance.MouseState.XButton2 == XnaInput.ButtonState.Pressed;
				default:
					return false;
			}
		}

		public static int GetScrollWheelValue()
		{
			return Game.Instance.MouseState.ScrollWheelValue;
		}
	}
}
